package org.jeecg.glr.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.glr.entity.GlrRadioTask;

/**
 * @Description: 音柱定时任务
 * @Author: jeecg-boot
 * @Date:   2020-02-13
 * @Version: V1.0
 */
public interface GlrRadioTaskMapper extends BaseMapper<GlrRadioTask> {
    @Select("select radio_id from glr_radio where id in (select member_id from glr_radio_task_member where task_id = #{taskId} and member_Type='1')")
    public List<String> getRadioIdByTaskId(String taskId);
    @Select("select member_id from glr_radio_task_member where task_id = #{taskId} and member_Type='1'")
    public List<String> getMemberIdByTaskId(String taskId);

    @Select("select file_Id from glr_resource where id in (select member_id from glr_radio_task_member where task_id = #{taskId} and member_Type='2')")
    public List<String> getfileIdByTaskId(String taskId);
    @Select("select file_id,rattop_file_id,rattop_media_id from glr_resource where id in (select member_id from glr_radio_task_member where task_id = #{taskId} and member_Type='2')")
    List<Map<String, Object>> getFieldsByTaskId(String taskId);
}
